module.exports = {
    chainWebpack(config) {
        config.externals({ './cptable': 'var cptable' })
    },
    css: {
        loaderOptions: {
            less: {
                javascriptEnabled: true
            }
        },
        sourceMap: true // 开启 CSS source maps
    },
    devServer: {
        port: 8080,
        proxy: {
            '/mxkaccount': { // jx-boot
                target: 'https://apiaccount.mxk8fin.com/', // 请求本地 需要jx-boot后台项目 http://localhost:9898/ https://api.mxk8.com
                ws: false,
                changeOrigin: true,
                pathRewrite: {
                    '^/mxkaccount': '' // 默认所有请求都加了jx-boot前缀，需要去掉
                }
            },
            '/sapi': {
                target: 'https://sapi.coincarp.com/',
                ws: false,
                changeOrigin: true,
                pathRewrite: {
                    '^/sapi': ''
                }
            }
        }
    }
}